package ipt.capitulo21;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class SegundoApplet extends JApplet{
	JButton boton1;
	JLabel etiqueta = new JLabel("Hola soy original");
	JPanel panel1;
	public void init(){
		boton1 = new JButton(" Pulsa aqui ");
		boton1.addActionListener(new VigilaBotones());
		panel1 = new JPanel();
		panel1.add(boton1);
		panel1.add(etiqueta);
		add("Center",panel1);
	}
	class VigilaBotones implements ActionListener{
		public void actionPerformed(ActionEvent e){
			String s = e.getActionCommand();
			etiqueta.setText(s);
		}
	}
}
